<?php
declare (strict_types=1);

namespace app\user\service\user;

use app\common\service\BaseService;
use app\user\logic\user\Account;
use think\Response;

class Ticket extends BaseService
{
    /**
     * userTicket
     * Author: 亓官雨树 <lucky.max@foxmail.com>
     * Date: 24/07/09
     *
     * @return Response
     */
    public function userTicket()
    {
        $user = request()->user;
        $data = app(Account::class)->getUserLoginTicket($user->id, $user->last_login_time, $user->create_time);
        app(\app\user\logic\user\Ticket::class)->setUserTicket($data);
        return $this->parseToData($data, 1, '获取成功');
    }
}
